<?php



class IdolNewsMapBuilder {

	
	const CLASS_NAME = 'lib.model.map.IdolNewsMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap('propel');

		$tMap = $this->dbMap->addTable('idol_news');
		$tMap->setPhpName('IdolNews');

		$tMap->setUseIdGenerator(true);

		$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('TITLE', 'Title', 'string', CreoleTypes::VARCHAR, false, 500);

		$tMap->addColumn('AVATAR_PATH', 'AvatarPath', 'string', CreoleTypes::VARCHAR, false, 500);

		$tMap->addColumn('QUOTE', 'Quote', 'string', CreoleTypes::VARCHAR, false, 500);

		$tMap->addColumn('CONTENT', 'Content', 'string', CreoleTypes::VARCHAR, false, 20000);

		$tMap->addColumn('SORT', 'Sort', 'int', CreoleTypes::TINYINT, false, null);

		$tMap->addColumn('ENABLE', 'Enable', 'int', CreoleTypes::TINYINT, false, null);

		$tMap->addColumn('CONTEST_RULES', 'ContestRules', 'int', CreoleTypes::TINYINT, false, null);

		$tMap->addColumn('CREATE_DATETIME', 'CreateDatetime', 'int', CreoleTypes::TIMESTAMP, false, null);

	} 
} 